#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         C. Albert Thompson

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

Func Dagger_Button()

	$cstate1 = GUICtrlRead( $Dagger_Combo1)
	$cstate2 = GUICtrlRead( $Dagger_Combo2)
	$cstate3 = GUICtrlRead( $Dagger_Combo3)
	$cstate4 = GUICtrlRead( $Dagger_Combo4)

	if $cstate1 = $GUI_CHECKED then 
		$Dagger_data_1 = Sqrt(GUICtrlRead($Dagger_Combo_1)*GUICtrlRead($Dagger_Combo_1))
		$Dagger_data_2 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
		$Dagger_data_3 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_2))
		$Dagger_data_4 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4))

	elseif $cstate2 = $GUI_CHECKED then 
		$Dagger_data_1 = Sqrt(GUICtrlRead($Dagger_Combo_1)*GUICtrlRead($Dagger_Combo_1))
		$Dagger_data_2 = Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
		$Dagger_data_3 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3))
		$Dagger_data_4 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4))

	elseif $cstate3 = $GUI_CHECKED then 
		$Dagger_data_1 = Sqrt(GUICtrlRead($Dagger_Combo_1)*GUICtrlRead($Dagger_Combo_1))
		$Dagger_data_2 = Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
		$Dagger_data_3 = Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3))
		$Dagger_data_4 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4))

	elseif $cstate4 = $GUI_CHECKED then 
		$Dagger_data_1 = Sqrt(GUICtrlRead($Dagger_Combo_1)*GUICtrlRead($Dagger_Combo_1))
		$Dagger_data_2 = Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
		$Dagger_data_3 = Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3))
		$Dagger_data_4 = Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4))
	Endif

	$cstate6 = GUICtrlRead( $Dagger_Combo6)
	if $cstate6 = $GUI_CHECKED then 
		$Dagger_data_6 = Sqrt(GUICtrlRead($Dagger_Combo_6)*GUICtrlRead($Dagger_Combo_6))
	elseif $cstate6 = $GUI_UNCHECKED then 
		$Dagger_data_6 = "-" & Sqrt(GUICtrlRead($Dagger_Combo_6)*GUICtrlRead($Dagger_Combo_6))
	EndIf


	IniWrite ( "attackhack.ini", "Dagger", "combo1delay", $Dagger_data_1 )
	IniWrite ( "attackhack.ini", "Dagger", "combo2delay", $Dagger_data_2 )
	IniWrite ( "attackhack.ini", "Dagger", "combo3delay", $Dagger_data_3 )
	IniWrite ( "attackhack.ini", "Dagger", "combo4delay", $Dagger_data_4 )
	IniWrite ( "attackhack.ini", "Dagger", "specialdelay", $Dagger_data_6 )
EndFunc
	
Func Dagger_Combo1()

	GUICtrlSetState($Dagger_Combo_2, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Label_2, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Combo_3, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Label_3, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Combo_4, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Label_4, $GUI_DISABLE)
	IniWrite ( "attackhack.ini", "Dagger", "combo2delay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2)))
	IniWrite ( "attackhack.ini", "Dagger", "combo3delay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3)))
	IniWrite ( "attackhack.ini", "Dagger", "combo4delay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4)))

EndFunc

Func Dagger_Combo2()
	GUICtrlSetState($Dagger_Combo_2, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Label_2, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Combo_3, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Label_3, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Combo_4, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Label_4, $GUI_DISABLE)

	$Dagger_data_2 = Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
	IniWrite ( "attackhack.ini", "Dagger", "combo2delay", $Dagger_data_2)
	IniWrite ( "attackhack.ini", "Dagger", "combo3delay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3)))
	IniWrite ( "attackhack.ini", "Dagger", "combo4delay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4)))

EndFunc

Func Dagger_Combo3()
	GUICtrlSetState($Dagger_Combo_2, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Label_2, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Combo_3, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Label_3, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Combo_4, $GUI_DISABLE)
	GUICtrlSetState($Dagger_Label_4, $GUI_DISABLE)

	$Dagger_data_2 = Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
	$Dagger_data_3 = Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3))
	IniWrite ( "attackhack.ini", "Dagger", "combo2delay", $Dagger_data_2)
	IniWrite ( "attackhack.ini", "Dagger", "combo3delay", $Dagger_data_3)
	IniWrite ( "attackhack.ini", "Dagger", "combo4delay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4)))
EndFunc

Func Dagger_Combo4()
	GUICtrlSetState($Dagger_Combo_2, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Label_2, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Combo_3, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Label_3, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Combo_4, $GUI_ENABLE)
	GUICtrlSetState($Dagger_Label_4, $GUI_ENABLE)


	$Dagger_data_2 = Sqrt(GUICtrlRead($Dagger_Combo_2)*GUICtrlRead($Dagger_Combo_2))
	$Dagger_data_3 = Sqrt(GUICtrlRead($Dagger_Combo_3)*GUICtrlRead($Dagger_Combo_3))
	$Dagger_data_4 = Sqrt(GUICtrlRead($Dagger_Combo_4)*GUICtrlRead($Dagger_Combo_4))
	IniWrite ( "attackhack.ini", "Dagger", "combo2delay", $Dagger_data_2)
	IniWrite ( "attackhack.ini", "Dagger", "combo3delay", $Dagger_data_3)
	IniWrite ( "attackhack.ini", "Dagger", "combo4delay", $Dagger_data_4)
EndFunc


Func Dagger_Combo6()
	$cstate = GUICtrlRead( $Dagger_Combo6)
	if $cstate = $GUI_UNCHECKED then 
		GUICtrlSetState($Dagger_Combo_6, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Label_6, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Combo7, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Label_7, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Combo8, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Label_8, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Combo9, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Label_9, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Combo10, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Label_10, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Combo11, $GUI_DISABLE)
		GUICtrlSetState($Dagger_Label_11, $GUI_DISABLE)

		IniWrite ( "attackhack.ini", "Dagger", "specialdelay", "-" & Sqrt(GUICtrlRead($Dagger_Combo_6)*GUICtrlRead($Dagger_Combo_6)))
	elseif $cstate = $GUI_CHECKED then 
		GUICtrlSetState($Dagger_Combo_6, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_6, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Combo_6, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_6, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Combo7, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_7, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Combo8, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_8, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Combo9, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_9, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Combo10, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_10, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Combo11, $GUI_ENABLE)
		GUICtrlSetState($Dagger_Label_11, $GUI_ENABLE)

		$Dagger_data_6 = Sqrt(GUICtrlRead($Dagger_Combo_6)*GUICtrlRead($Dagger_Combo_6))
		IniWrite ( "attackhack.ini", "Dagger", "specialdelay", $Dagger_data_6)
	EndIf
EndFunc

Func Dagger_Special()
;Asp 1
;Adder 2
;Dirt 3
;Side Winder 4
;Nest 5


	$cstate1 = GUICtrlRead($Dagger_Combo7)
	$cstate2 = GUICtrlRead($Dagger_Combo8)
	$cstate3 = GUICtrlRead($Dagger_Combo9)
	$cstate4 = GUICtrlRead($Dagger_Combo10)
	$cstate5 = GUICtrlRead($Dagger_Combo11)


	$special = ""
	If $cstate1 = $GUI_CHECKED Then
		$special = $special & "1"
	EndIf
	
	If $cstate2 = $GUI_CHECKED Then
		$special = $special & "2"
	EndIf

	If $cstate3 = $GUI_CHECKED Then
		$special = $special & "3"
	EndIf

	If $cstate4 = $GUI_CHECKED Then
		$special = $special & "4"
	EndIf
	
	If $cstate5 = $GUI_CHECKED Then
		$special = $special & "5"
	EndIf

		IniWrite ( "attackhack.ini", "dagger", "specials", $special)

EndFunc


Func dagger()
	If (WinActive("Pirates")) Then
		$daggerinfo = IniReadSection("attackhack.ini", "dagger" )
		HotKeySet("{F4}")
		$activeWeapon = 4
		Sleep($daggerinfo[7][1])
		Send("{F4}")
		HotKeySet("{F4}", "idle")
	
		While 1
			If (WinActive("Pirates")) Then
				If $daggerinfo[2][1] > 0 Then
					If (StringInStr($daggerinfo[1][1], "1")) Then
						$dif = TimerDiff($beginAsp)
						If ($dif >= 15000) Then
							Send("1")
							$beginAsp = TimerInit()
							Sleep($daggerinfo[2][1])
						EndIf
					EndIf
				
					If (StringInStr($daggerinfo[1][1], "2")) Then
						$dif = TimerDiff($beginAdder)
						If ($dif >= 15000) Then
							Send("2")
							$beginAdder = TimerInit()
							Sleep($daggerinfo[2][1])
						EndIf
					EndIf
					
					If (StringInStr($daggerinfo[1][1], "3")) Then
						$dif = TimerDiff($beginDirt)
						If ($dif >= 21000) Then
							Send("3")
							$beginDirt = TimerInit()
							Sleep($daggerinfo[2][1])
						EndIf
					EndIf
					
					If (StringInStr($daggerinfo[1][1], "4")) Then
						$dif = TimerDiff($beginSidewinder)
						If ($dif >= 15000) Then
							Send("4")
							$beginSidewinder = TimerInit()
							Sleep($daggerinfo[2][1])
						EndIf
					EndIf
					
					If (StringInStr($daggerinfo[1][1], "5")) Then
						$dif = TimerDiff($beginNest)
						If ($dif >= 26000) Then
							Send("5")
							$beg	inNest = TimerInit()
							Sleep($daggerinfo[2][1])
						EndIf
					EndIf
				EndIf
				
				Send("{LCTRL}")
				Sleep($daggerinfo[3][1])
				
				If ($daggerinfo[4][1] < 0) Then
					ContinueLoop
				EndIf
				Send("{LCTRL}")
				Sleep($daggerinfo[4][1])
		
				If ($daggerinfo[5][1] < 0) Then
					ContinueLoop
				EndIf
				Send("{LCTRL}")
				Sleep($daggerinfo[5][1])
				
				If ($daggerinfo[6][1] < 0) Then
					ContinueLoop
				EndIf
				Send("{LCTRL}")
				Sleep($daggerinfo[6][1])
			EndIf
		WEnd
	EndIf
EndFunc